<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8" />
		<meta name="viewport" content="width=device-width,initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" />
		<title>牛只列表</title>
		<link href="css/new_file.css" rel="stylesheet" type="text/css">

		<script charset="UTF-8" src="js/config.js"></script>
		<script charset="UTF-8" src="js/testActivityName.js"></script>
		<script charset="UTF-8" src="js/core.js"></script>
		<script charset="UTF-8" src="js/cipher-core.js"></script>
		<script charset="UTF-8" src="js/tripledes.js"></script>
		<script charset="UTF-8" src="js/mode-ecb.js"></script>
		<script src="js/jquery-1.8.3.min.js"></script>
		<script type="text/javascript" src="js/zepto.min.js"></script>
		<script type="text/javascript" src="js/spin.min.js"></script>
		<script charset="UTF-8" src="js/mui.min.js"></script>
		<script src="js/echarts.min.js"></script>
		<style type="text/css">
			.nearsite-message {
				display: inline-block;
				clear: both;
				margin: 10px;
			}
			
			.nearsite-message .avatar {
				float: left;
			}
			
			.nearsite-message .avatar img {
				width: 30px;
				height: 30px;
				border-radius: 50%;
			}
			
			.nearsite-message .content {
				float: left;
				background: #fff;
				margin: 0 10px -20px 10px;
				padding: 10px;
				border-radius: 7px;
				max-width: 90%;
				position: relative;
				min-height: 30px;
				font-size: 15px;
			}
			
			.nearsite-message .content img {
				width: 100%;
			}
			
			.nearsite-message .triangle {
				height: 0px;
				width: 0px;
				border-width: 8px;
				border-style: solid;
				position: absolute;
				top: 6px;
				border-color: transparent #fff transparent transparent;
				left: -16px;
			}
			
			.vertbar {
				width: 1px;
				height: 50px;
				background-color: #a2a2a2;
				margin: -34px 25px -8px;
			}
		</style>
	</head>

	<body>

		<div class="head-zhjf">
			<img src="images/fanhui@3x.png" class="ryjk-tx" onclick="fanhuisss()">

			<!--<div class="head-zhjf-img" onclick="modifyView()">
				<img src="images/xiugai.png">
			</div>-->

			<p>生理状态变化记录</p>
		</div>

		<div class="mui-content">
			<div id="noApplicationRecord"></div>

			<!--<div class='nearsite-message'>
				<div class='avatar'>
					<img src="images/circle.png" />
				</div>
				<div class='content'>
					<div class='triangle'></div>
					<span>2018-02-18 12:36:48</span>
					<br />
					<span>生理状态：未发情，</span>
					<span>记录人：张三</span>
				</div>
			</div>
			<div class="vertbar"></div>-->
		</div>

	</body>
	<script>
		function fanhuisss() {
			window.location = "2.1.1牛只详情.html";
		}
		var cowPhysiologyHistoryData = JSON.parse(localStorage.getItem('cowPhysiologyHistoryData'));
		var noApplicationRecord = document.getElementById('noApplicationRecord');
		console.log(cowPhysiologyHistoryData)
		function setDiv(item) {
			var div = '<div class="nearsite-message"><div class="avatar"><img src="images/circle.png" /></div><div class="content"><div class="triangle"></div><span>'
			+item.time+
			'</span><br /><span>生理状态：'
			+item.cowState+
			'，</span><span>记录人：'
			+item.userName+
			'</span></div></div><div class="vertbar"></div>'
			return div
		}

		function getnoApplicationData() {
			var html = ''
			for(var i = 0; i < cowPhysiologyHistoryData.length; i++) {
				html += setDiv(cowPhysiologyHistoryData[i])
			}
			noApplicationRecord.innerHTML = html
		}
		window.onload = getnoApplicationData()
	</script>

</html>